package com.ruoyi.WarnNotification.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.WarnNotification.mapper.WarningNotificationMapper;
import com.ruoyi.WarnNotification.domain.WarningNotification;
import com.ruoyi.WarnNotification.service.IWarningNotificationService;

/**
 * 预警通知记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-21
 */
@Service
public class WarningNotificationServiceImpl implements IWarningNotificationService 
{
    @Autowired
    private WarningNotificationMapper warningNotificationMapper;

    /**
     * 查询预警通知记录
     * 
     * @param notifyId 预警通知记录主键
     * @return 预警通知记录
     */
    @Override
    public WarningNotification selectWarningNotificationByNotifyId(Long notifyId)
    {
        return warningNotificationMapper.selectWarningNotificationByNotifyId(notifyId);
    }

    /**
     * 查询预警通知记录列表
     * 
     * @param warningNotification 预警通知记录
     * @return 预警通知记录
     */
    @Override
    public List<WarningNotification> selectWarningNotificationList(WarningNotification warningNotification)
    {
        return warningNotificationMapper.selectWarningNotificationList(warningNotification);
    }

    /**
     * 新增预警通知记录
     * 
     * @param warningNotification 预警通知记录
     * @return 结果
     */
    @Override
    public int insertWarningNotification(WarningNotification warningNotification)
    {
        return warningNotificationMapper.insertWarningNotification(warningNotification);
    }

    /**
     * 修改预警通知记录
     * 
     * @param warningNotification 预警通知记录
     * @return 结果
     */
    @Override
    public int updateWarningNotification(WarningNotification warningNotification)
    {
        return warningNotificationMapper.updateWarningNotification(warningNotification);
    }

    /**
     * 批量删除预警通知记录
     * 
     * @param notifyIds 需要删除的预警通知记录主键
     * @return 结果
     */
    @Override
    public int deleteWarningNotificationByNotifyIds(Long[] notifyIds)
    {
        return warningNotificationMapper.deleteWarningNotificationByNotifyIds(notifyIds);
    }

    /**
     * 删除预警通知记录信息
     * 
     * @param notifyId 预警通知记录主键
     * @return 结果
     */
    @Override
    public int deleteWarningNotificationByNotifyId(Long notifyId)
    {
        return warningNotificationMapper.deleteWarningNotificationByNotifyId(notifyId);
    }


    @Override
    public String getUsernotifyContent(Long userId)
    {
        return warningNotificationMapper.getUsernotifyContent(userId);
    }
}
